<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;

/**
 * 微信二维码模型
 * @package App\Models
 */
class WxQrcode extends Model
{
    use SoftDeletes;
    //主键
    protected $primaryKey = 'qrcode_id';
    protected $dateFormat = 'Y-m-d H:i:s';

    /**
     * 获取二维码用途数据
     * @return \Illuminate\Database\Eloquent\Relations\HasMany
     */
    public function uses()
    {
        return $this->hasMany('App\Models\WxQrcodeUse','qrcode_id', 'qrcode_id');
    }
}
